package com.balabala.api;

import com.balabala.result.Result;
import com.balabala.vo.UserVipCardInfoVO;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestParam;

import java.util.List;

/**
 * @Author 何涛
 * @Date: 2023/05/06/ 15:25
 * @description 用户会员卡信息
 */
@FeignClient(value = "gym-user-service",contextId = "userVipCardFeign")
public interface UserVipCardFeignClient {
    /**
     * 根据用户id远程查询用户信息
     * @param userId
     * @return
     */
    @GetMapping("/admin/userVipCard/getUserCardInfoByUserId")
    Result<List<UserVipCardInfoVO>> getUserCardInfoByUserId(@RequestParam Long userId);

    /**
     * 根据用户会员卡id查询用户会员卡信息
     * @param userCardId
     * @return
     */
    @GetMapping("/admin/userVipCard/getUserCardInfo/{user_card_id}")
    Result<UserVipCardInfoVO>  getUserCardInfo(@PathVariable("user_card_id")Long userCardId);

}
